package data.repository;

import java.io.Serializable;
import java.util.List;

public interface IRepository<T> {
	public List<T> getAll(final Class<T> clazz) throws RepositoryException;
	
	public List<T> getAll(final String queryExpression, final QueryParameter... parameters) throws RepositoryException;
	        
	public T get(final Class<T> clazz, final Serializable id) throws RepositoryException;
	
	public T get(final String queryExpression, final QueryParameter... parameters) throws RepositoryException;
	
	public boolean exists(final Class<T> clazz, final Serializable id) throws RepositoryException;
	
	public void saveOrUpdate(final T instance) throws RepositoryException;
	
	public void delete(final T instance) throws RepositoryException;
}
